package cn.iocoder.yudao.module.mqtt.dal.mysql.scmc;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.mqtt.dal.dataobject.scmc.ScmcDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.mqtt.controller.admin.scmc.vo.*;

/**
 * 监测局 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface ScmcMapper extends BaseMapperX<ScmcDO> {

    default PageResult<ScmcDO> selectPage(ScmcPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ScmcDO>()
                .eqIfPresent(ScmcDO::getScCode, reqVO.getScCode())
                .likeIfPresent(ScmcDO::getScName, reqVO.getScName())
                .eqIfPresent(ScmcDO::getScCity, reqVO.getScCity())
                .eqIfPresent(ScmcDO::getScCounty, reqVO.getScCounty())
                .eqIfPresent(ScmcDO::getScTown, reqVO.getScTown())
                .eqIfPresent(ScmcDO::getScType, reqVO.getScType())
                .eqIfPresent(ScmcDO::getScConect, reqVO.getScConect())
                .eqIfPresent(ScmcDO::getScContent, reqVO.getScContent())
                .eqIfPresent(ScmcDO::getScMemo, reqVO.getScMemo())
                .betweenIfPresent(ScmcDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ScmcDO::getId));
    }

}